<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<input type="text" id="userName" name="userName" value="zxx01" />
		<input id="input007" type="button" value="单击" />
		
	</body>
	<script type="text/javascript" src="../../js/jquery-1.7.2.js" ></script>
	<script>
		/*window.onload=function(){
			document.getElementById('input007').onclick=function(){
				var zxx = document.getElementById('userName').value;
				alert(zxx);
			}
		};*/
		
		$(function(){
			$('#input007').click(function(){
				var zxx = $('#userName').val();
				console.log(zxx);
			});
		});
		
	</script>
</html>
